package com.zy.feign.caller.hystrix;

import com.zy.feign.caller.service.FeignTestService;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class FeignTestFallbackImpl implements FeignTestService {

    /*
    hystrix回退后的处理
     */
    @Override
    public Map<String, Object> getData(String msg) {
        return new HashMap<String,Object>(){{
            put("code", "Fallback");
            put("msg", "ServiceUnAvailable");
        }};
    }
}
